package org.jiuling.youbianku.spring.config;

import org.jiuling.youbianku.YouBianKuSearchStreet;
import org.jiuling.youbianku.config.YouBianKuConfig;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 邮编库SpringBean配置
 * @author 紫灵
 * @date 2024年08月21日 17时57分56秒
 */
@Configuration
public class YouBianKuSpringBeanConfig {

    @Bean
    @ConfigurationProperties(prefix = "jiu-ling.youbianku.config")
    public YouBianKuConfig youBianKuConfig() {
        return new YouBianKuConfig();
    }

    @Bean
    public YouBianKuSearchStreet youBianKuSearchStreet() {
        return new YouBianKuSearchStreet(youBianKuConfig());
    }

}
